{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<include file="Public:new" />
<load href='__TMPL__Common/js/jquery.bgiframe.js' />
<load href='__TMPL__Common/js/jquery.weebox.js' />
<load href='__TMPL__Common/js/user.js' />
<load href='__TMPL__Common/js/deal.js' />
<load href='__TMPL__Common/style/weebox.css' />
<script type="text/javascript" src="__TMPL__Common/js/calendar/calendar.php?lang=zh-cn" ></script>
<load href='__TMPL__Common/js/calendar/calendar.css' />
<load href='__TMPL__Common/js/calendar/calendar.js' />
<div class="main">
    <div class="main_title_list"><div class="list-line-ico"></div>{$bm_two}成交报表</div>
    <div class="search_row">
        <form name="search" action="__APP__" method="get" class="clearfix">
            <div>时间:
            	<input type="text" class="textbox" name="begin_time" id="begin_time" onfocus="this.blur(); return showCalendar('begin_time', '%Y-%m-%d', false, false, 'btn_begin_time');" value="{$begin_time}"/>
                <input type="button" class="button" id="btn_begin_time" value="{%SELECT_TIME}" onclick="return showCalendar('begin_time', '%Y-%m-%d', false, false, 'btn_begin_time');" />
                <span>-</span> 
                <input type="text" class="textbox" name="end_time" id="end_time" onfocus="this.blur(); return showCalendar('end_time', '%Y-%m-%d', false, false, 'btn_end_time');" value="{$end_time}" value="{$end_time}"/>
                <input type="button" class="button" id="btn_end_time" value="{%SELECT_TIME}" onclick="return showCalendar('end_time', '%Y-%m-%d', false, false, 'btn_end_time');" />
            </div>
            <div>机构编号：<input type="text" class="textbox" name="login_name" value="{:trim($_REQUEST['login_name'])}">          </div>
            <div>模糊机构编号：<input type="text" class="textbox" name="login_name1" value="{:trim($_REQUEST['login_name1'])}">          </div>
            <input type="hidden" value="BmPromoterBargain" name="m" />
            <input type="hidden" value="index" name="a" />
            <input type="submit" class="button" value="{%SEARCH}" />
            <input type="button" class="button" value="{%EXPORT}" onclick="export_csv();" />
        </form>
    </div>
<html:list
    id="dataTable"
    style="dataTable"
    name="user"
    datasource="list"
    show="p_login_name:{$bm_two}编号
    ,p_name:{$bm_two}名称
    ,promoter_ticket:所得礼物{$ticket_name}
    ,gain_lose:{$bm_two}游戏手续费
    ,platform_gain:平台留存手续费
    ,promoter_gain:{$bm_one}留存手续费
    ,user_ticket:主播留存{$ticket_name}
    ,p_parent_login_name:所属{$bm_one}编号
    "/>
<div class="page">{$page}</div>
</div>
<script>
	$("#dataTable").find("th a").each(function(){
		if($.trim($(this).html())=='所得礼物{$ticket_name}'||$.trim($(this).html())=='主播留存{$ticket_name}'||$.trim($(this).html())=='{$bm_two}游戏手续费'||$.trim($(this).html())=='平台留存手续费'||$.trim($(this).html())=='{$bm_one}留存手续费'||$.trim($(this).html())=='所属{$bm_one}编号')
		{
			$(this).parents("th").html($(this).html());
		}
	});
	var html = '<tr class="row">'+
            '	<td>合计</td>'+
             '   <td></td>'+
              '  <td>{$total_re.promoter_ticket}</td>'+
               ' <td>{$total_re.gain_lose}</td>'+
                '<td>{$total_re.platform_gain}</td>'+
                '<td>{$total_re.promoter_gain}</td>'+
                '<td>{$total_re.user_ticket}</td>'+
				'   <td></td>'+
            '</tr>';
	$("#dataTable").append(html);
</script>
<include file="Public:footer" />